using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Web.SessionState;

namespace DD.Users
{
    public static class UserManager
    {

        public static User GetUser(int UserId)
        {
            throw new System.NotImplementedException();
        }

        public static User GetUser(string Email)
        {
            throw new System.NotImplementedException();
        }

        public static void AddUser(User user, string pwd)
        {
            DD.Data.SQL.UserManager.AddUser(user, pwd);
        }

        public static bool Login(string Username, string Password)
        {
            return DD.Data.SQL.UserManager.LogUserIn(Username, Password);
           
            
        }

        public static bool IsUserLoggedIn()
        {
            if(HttpContext.Current.Session["DDID"] != null && HttpContext.Current.Session["DDID"] != "")
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }

}